#!/bin/bash

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

exec="$WAVES_DIR/bin/prepareCase.sh"

if [ -x "$exec" ]
then
    . $exec
else
    echo "Make the file $WAVES_DIR/bin/prepareCase.sh executable."
    echo
    chmod +x $exec
    . $exec
fi

# Set application name
application="waveFoam"

# Create mesh
runApplication blockMesh

# Create internal wall
runApplication faceSet
runApplication setsToZones -noFlipMap
runApplication createBaffles f0 internalWall -overwrite

# Set wave parameters
runApplication setWaveParameters

# Set wave field
runApplication setWaveField

# Run application
runApplication $application


